{include file="../public/static/html/header.html"}
<body>
<article class="page-container">
	<form class="form form-horizontal" id="form-admin-add">
	<div class="row cl">
		<input id="m_id" style="display: none" value="{$list['m_id']}">
		<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>菜单名称：</label>
		<div class="formControls col-xs-8 col-sm-9">
			<input type="text" class="input-text" value="{$list['m_name']}" placeholder="" id="m_name" name="m_name">
		</div>
	</div>
	<div class="row cl">
		<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>所属模块的名称：</label>
		<div class="formControls col-xs-8 col-sm-9">
			<input type="text" class="input-text" autocomplete="off" value="{$list['apps']}" placeholder="你所在模块的名称如admin" id="apps" name="apps">
		</div>
	</div>
	<div class="row cl">
		<label class="form-label col-xs-4 col-sm-3">图标：</label>
		<div class="formControls col-xs-8 col-sm-9">
			<span class="select-box" style="width:150px;">
			<select class="select" name="icon" size="1">
				<option value="625">主页类</option>
				<option value="613">图片类</option>
				<option value="62e">系统类</option>
				<option value="634">出库类</option>
				<option value="627">订单类</option>
				<option value="60a">用户类</option>
			</select>
			</span>
		</div>
	</div>
	<div class="row cl">
		<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
			<input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
		</div>
	</div>
	</form>
</article>
{include file="../public/static/html/last.html"}
<script type="text/javascript">
$(function(){
	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});

	$("#form-admin-add").validate({
		//验证规则
		rules:{
			m_name:{
				required:true,
			},
			apps:{
				required:true,
			},
		},
		// end 验证规则
		onkeyup:false,
		focusCleanup:true,
		success:"valid",
		submitHandler:function(form){
			var data=$('#form-admin-add').serializeArray();
			//添加一级菜单链接
			var url="/admin/menu/menu_update_all?m_id="+$('#m_id').attr('value');
			$.post(url,data,function(result)
			{
                   if(result.code==1)
				   {
					   dialog.ok(result.msg);
				   }
				   else
				   {
					   dialog.error(result.msg);
				   }
			},'JSON');
		}
	});
});
</script> 
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>